home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 July / Macworld (1999-07).dmg / Shareware World / Info / For Developers / Mops 3.4.sea / Mops source / Toolbox classes / Alert next >
Text File  |  1997-11-11  |  605b  |  38 lines

  1. \ Alert support.
  2.  
  3. enum{    StopAlertType  NoteAlertType  CautionAlertType  }
  4.  
  5.  
  6. :class    ALERT    super{ x-array }
  7.  
  8.     int    RESID
  9.     int    TYPE
  10.  
  11. :m SHOW:
  12.     get: resID  0 ( procID )  get: type
  13.     SELECT[        StopAlertType        ]=>  StopAlert
  14.           [        NoteAlertType        ]=>  NoteAlert
  15.           [        CautionAlertType    ]=>  CautionAlert
  16.         DEFAULT=>                    drop  Zlert
  17.     ]SELECT
  18.  
  19.     dup 0>
  20.     IF    1-  exec: super
  21.     ELSE    drop
  22.     THEN  ;m
  23.  
  24. :m INIT:    \ ( xt1 ... xtN N resID -- )
  25.     put: resID  put: super  ;m
  26.  
  27. :m SETTYPE:
  28.     put: type  ;m
  29.  
  30. :m DISP:    \ ( resID type -- )
  31.     put: type  put: resID  show: self  ;m
  32.  
  33. :m CLASSINIT:
  34.     16  put: type
  35.     classinit: super  ;m
  36.  
  37. ;class
  38.